//microcommand define loglevel
signature("<label> <level:natural>", { authority: 4 })
action(({ session }, label, level) => {
  if (!(level >= 0 && level <= 3)) return session.text(".incorrect-level")
  new Logger(label).level = level
  ctx.logger.info("'" + label + "'", "log level set to", level)
  return session.text(".set", { label, level })
})
locale("zh-CN", { description: "设置日志等级", messages: { "incorrect-level": "日志等级必须在 0~3 之间。", set: "{label} 日志等级已设为 {level}。" } })